# -*- coding: utf-8 -*-
# Project  : JXC
# FileName : urls.py
# Time     : 2020/7/1 11:50
# Author  : Mason101

from django.urls import path
from . import login_views, user_views, role_views, storehouse_views, permission_views

app_name = "user"
urlpatterns = [
    path("login/", login_views.login, name="login"),
    path("logout/", login_views.logout, name="logout"),

    path("index/", user_views.index, name="user_index"),
    path("api/user/list/", user_views.user_list, name="user_list"),
    path("api/user/add/", user_views.user_add, name="user_add"),
    path("api/user/edit/<user_id>/", user_views.user_edit, name="user_edit"),
    path("api/user/del/<user_id>/", user_views.user_delete, name="user_del"),
    path("api/user/status/<user_id>/", user_views.user_status, name="user_status"),

    path("role/index/", role_views.index, name="role_index"),
    path("api/role/list/", role_views.role_list, name="role_list"),
    path("api/role/add/", role_views.role_add, name="role_add"),
    path("api/role/edit/<role_id>/", role_views.role_edit, name="role_edit"),
    path("api/role/del/<role_id>/", role_views.role_del, name="role_del"),
    path("api/role/status/<role_id>/", role_views.role_status, name="role_status"),

    path("storehouse/index/", storehouse_views.index, name="storehouse_index"),
    path("api/storehouse/list/", storehouse_views.storehouse_list, name="storehouse_list"),
    path("api/storehouse/add/", storehouse_views.storehouse_add, name="storehouse_add"),
    path("api/storehouse/edit/<store_id>/", storehouse_views.storehouse_edit, name="storehouse_edit"),
    path("api/storehouse/del/<store_id>/", storehouse_views.storehouse_del, name="storehouse_del"),
    path("api/storehouse/status/<store_id>/", storehouse_views.storehouse_status, name="storehouse_status"),

    path("permission/index/", permission_views.index, name="permission_index"),
    path("api/permission/list/", permission_views.permission_list, name="permission_list"),
    path("api/permission/add/", permission_views.permission_add, name="permission_add"),
    path("api/permission/edit/<per_id>/", permission_views.permission_edit, name="permission_edit"),
    path("api/permission/del/<per_id>/", permission_views.permission_del, name="permission_del"),
    path("api/permission/status/<per_id>/", permission_views.permission_status, name="permission_status")
]
